package onki.tests;

public abstract class OnkiTestBase {
  protected final String baseUrl;
  protected String conceptUri;

  public OnkiTestBase() {
   baseUrl = "http://localhost/onki-light/";
  }

  public OnkiTestBase(String url) {
    baseUrl = url;
  }
  
  /*
   * Strips the good parts from the concept uri so the uri can be used as a onki-light url.
   */
  public String lightenUrl(String url, String lang) {
    String[] urlArray = url.split("/");
    String fixedUrl = baseUrl + urlArray[urlArray.length - 2] + "/" + lang + "/page/" + urlArray[urlArray.length - 1];
    return fixedUrl;
  }
  
}
